/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: Faculty of informatics, Burapha University 01
 * License Type: Purchased
 */
package cn.imvc.app.entities;

import java.io.Serializable;
import javax.persistence.*;
@Entity
@org.hibernate.annotations.Proxy(lazy=false)
@Table(name="comments")
public class Comments implements Serializable {
	public Comments() {
	}
	
	private int id;
	
	private cn.imvc.app.entities.Member member;
	
	private cn.imvc.app.entities.GoodsOrder goodsOrder;
	
	private cn.imvc.app.entities.Goods goods;
	
	private cn.imvc.app.entities.GoodsSku goodsSku;
	
	private String goodsName;
	
	private Integer goodsPrice;
	
	private Integer goodsNum;
	
	private String goodsSpec;
	
	private Byte scores;
	
	private String content;
	
	private java.util.Date addtime;
	
	private Byte state;
	
	private String remark;
	
	private String reply;
	
	private String image;
	
	private String image2;
	
	private String image3;
	
	private String image4;
	
	private String image5;
	
	public void setId(int value) {
		this.id = value;
	}
	
	@Column(name="id", nullable=false)	
	@Id	
	@GeneratedValue(generator="CN_IMVC_APP_ENTITIES_COMMENTS_ID_GENERATOR")	
	@org.hibernate.annotations.GenericGenerator(name="CN_IMVC_APP_ENTITIES_COMMENTS_ID_GENERATOR", strategy="identity")	
	public int getId() {
		return id;
	}
	
	@Transient	
	public int getORMID() {
		return getId();
	}
	
	/**
	 * 商品名称
	 */
	public void setGoodsName(String value) {
		this.goodsName = value;
	}
	
	/**
	 * 商品名称
	 */
	@Column(name="goodsName", nullable=true, length=255)	
	public String getGoodsName() {
		return goodsName;
	}
	
	/**
	 * 价格
	 */
	public void setGoodsPrice(int value) {
		setGoodsPrice(new Integer(value));
	}
	
	/**
	 * 价格
	 */
	public void setGoodsPrice(Integer value) {
		this.goodsPrice = value;
	}
	
	/**
	 * 价格
	 */
	@Column(name="goodsPrice", nullable=true, length=10)	
	public Integer getGoodsPrice() {
		return goodsPrice;
	}
	
	/**
	 * 数量
	 */
	public void setGoodsNum(int value) {
		setGoodsNum(new Integer(value));
	}
	
	/**
	 * 数量
	 */
	public void setGoodsNum(Integer value) {
		this.goodsNum = value;
	}
	
	/**
	 * 数量
	 */
	@Column(name="goodsNum", nullable=true, length=10)	
	public Integer getGoodsNum() {
		return goodsNum;
	}
	
	/**
	 * 规格
	 */
	public void setGoodsSpec(String value) {
		this.goodsSpec = value;
	}
	
	/**
	 * 规格
	 */
	@Column(name="goodsSpec", nullable=true, length=255)	
	public String getGoodsSpec() {
		return goodsSpec;
	}
	
	/**
	 * 1-5分
	 */
	public void setScores(byte value) {
		setScores(new Byte(value));
	}
	
	/**
	 * 1-5分
	 */
	public void setScores(Byte value) {
		this.scores = value;
	}
	
	/**
	 * 1-5分
	 */
	@Column(name="scores", nullable=true)	
	public Byte getScores() {
		return scores;
	}
	
	/**
	 * 评价内容
	 */
	public void setContent(String value) {
		this.content = value;
	}
	
	/**
	 * 评价内容
	 */
	@Column(name="content", nullable=true, length=255)	
	public String getContent() {
		return content;
	}
	
	/**
	 * 评价时间
	 */
	public void setAddtime(java.util.Date value) {
		this.addtime = value;
	}
	
	/**
	 * 评价时间
	 */
	@Column(name="addtime", nullable=true)	
	@Temporal(TemporalType.TIMESTAMP)	
	public java.util.Date getAddtime() {
		return addtime;
	}
	
	/**
	 * 状态0为审核 1审核中 2审核通过
	 */
	public void setState(byte value) {
		setState(new Byte(value));
	}
	
	/**
	 * 状态0为审核 1审核中 2审核通过
	 */
	public void setState(Byte value) {
		this.state = value;
	}
	
	/**
	 * 状态0为审核 1审核中 2审核通过
	 */
	@Column(name="state", nullable=true)	
	public Byte getState() {
		return state;
	}
	
	/**
	 * 对评价的处理备注
	 */
	public void setRemark(String value) {
		this.remark = value;
	}
	
	/**
	 * 对评价的处理备注
	 */
	@Column(name="remark", nullable=true, length=255)	
	public String getRemark() {
		return remark;
	}
	
	/**
	 * 解释内容
	 */
	public void setReply(String value) {
		this.reply = value;
	}
	
	/**
	 * 解释内容
	 */
	@Column(name="reply", nullable=true, length=255)	
	public String getReply() {
		return reply;
	}
	
	/**
	 * 晒单图片
	 */
	public void setImage(String value) {
		this.image = value;
	}
	
	/**
	 * 晒单图片
	 */
	@Column(name="image", nullable=true, length=255)	
	public String getImage() {
		return image;
	}
	
	public void setImage2(String value) {
		this.image2 = value;
	}
	
	@Column(name="image2", nullable=true, length=255)	
	public String getImage2() {
		return image2;
	}
	
	public void setImage3(String value) {
		this.image3 = value;
	}
	
	@Column(name="image3", nullable=true, length=255)	
	public String getImage3() {
		return image3;
	}
	
	public void setImage4(String value) {
		this.image4 = value;
	}
	
	@Column(name="image4", nullable=true, length=255)	
	public String getImage4() {
		return image4;
	}
	
	public void setImage5(String value) {
		this.image5 = value;
	}
	
	@Column(name="image5", nullable=true, length=255)	
	public String getImage5() {
		return image5;
	}
	
	public void setGoodsOrder(cn.imvc.app.entities.GoodsOrder value) {
		this.goodsOrder = value;
	}
	
	@ManyToOne(targetEntity=cn.imvc.app.entities.GoodsOrder.class, fetch=FetchType.LAZY)	
	@org.hibernate.annotations.Cascade({org.hibernate.annotations.CascadeType.LOCK})	
	@JoinColumns({ @JoinColumn(name="goodsOrderId", referencedColumnName="id", nullable=false) })	
	@org.hibernate.annotations.LazyToOne(value=org.hibernate.annotations.LazyToOneOption.NO_PROXY)	
	public cn.imvc.app.entities.GoodsOrder getGoodsOrder() {
		return goodsOrder;
	}
	
	public void setGoodsSku(cn.imvc.app.entities.GoodsSku value) {
		this.goodsSku = value;
	}
	
	@ManyToOne(targetEntity=cn.imvc.app.entities.GoodsSku.class, fetch=FetchType.LAZY)	
	@org.hibernate.annotations.Cascade({org.hibernate.annotations.CascadeType.LOCK})	
	@JoinColumns({ @JoinColumn(name="goodsSkuId", referencedColumnName="id", nullable=false) })	
	@org.hibernate.annotations.LazyToOne(value=org.hibernate.annotations.LazyToOneOption.NO_PROXY)	
	public cn.imvc.app.entities.GoodsSku getGoodsSku() {
		return goodsSku;
	}
	
	public void setGoods(cn.imvc.app.entities.Goods value) {
		this.goods = value;
	}
	
	@ManyToOne(targetEntity=cn.imvc.app.entities.Goods.class, fetch=FetchType.LAZY)	
	@org.hibernate.annotations.Cascade({org.hibernate.annotations.CascadeType.LOCK})	
	@JoinColumns({ @JoinColumn(name="goodsId", referencedColumnName="id", nullable=false) })	
	@org.hibernate.annotations.LazyToOne(value=org.hibernate.annotations.LazyToOneOption.NO_PROXY)	
	public cn.imvc.app.entities.Goods getGoods() {
		return goods;
	}
	
	public void setMember(cn.imvc.app.entities.Member value) {
		this.member = value;
	}
	
	@ManyToOne(targetEntity=cn.imvc.app.entities.Member.class, fetch=FetchType.LAZY)	
	@org.hibernate.annotations.Cascade({org.hibernate.annotations.CascadeType.LOCK})	
	@JoinColumns({ @JoinColumn(name="memberId", referencedColumnName="id", nullable=false) })	
	@org.hibernate.annotations.LazyToOne(value=org.hibernate.annotations.LazyToOneOption.NO_PROXY)	
	public cn.imvc.app.entities.Member getMember() {
		return member;
	}
	
	public String toString() {
		return toString(false);
	}
	
	public String toString(boolean idOnly) {
		if (idOnly) {
			return String.valueOf(getId());
		}
		else {
			StringBuffer sb = new StringBuffer();
			sb.append("Comments[ ");
			sb.append("Id=").append(getId()).append(" ");
			if (getMember() != null)
				sb.append("Member.Persist_ID=").append(getMember().toString(true)).append(" ");
			else
				sb.append("Member=null ");
			if (getGoodsOrder() != null)
				sb.append("GoodsOrder.Persist_ID=").append(getGoodsOrder().toString(true)).append(" ");
			else
				sb.append("GoodsOrder=null ");
			if (getGoods() != null)
				sb.append("Goods.Persist_ID=").append(getGoods().toString(true)).append(" ");
			else
				sb.append("Goods=null ");
			if (getGoodsSku() != null)
				sb.append("GoodsSku.Persist_ID=").append(getGoodsSku().toString(true)).append(" ");
			else
				sb.append("GoodsSku=null ");
			sb.append("GoodsName=").append(getGoodsName()).append(" ");
			sb.append("GoodsPrice=").append(getGoodsPrice()).append(" ");
			sb.append("GoodsNum=").append(getGoodsNum()).append(" ");
			sb.append("GoodsSpec=").append(getGoodsSpec()).append(" ");
			sb.append("Scores=").append(getScores()).append(" ");
			sb.append("Content=").append(getContent()).append(" ");
			sb.append("Addtime=").append(getAddtime()).append(" ");
			sb.append("State=").append(getState()).append(" ");
			sb.append("Remark=").append(getRemark()).append(" ");
			sb.append("Reply=").append(getReply()).append(" ");
			sb.append("Image=").append(getImage()).append(" ");
			sb.append("Image2=").append(getImage2()).append(" ");
			sb.append("Image3=").append(getImage3()).append(" ");
			sb.append("Image4=").append(getImage4()).append(" ");
			sb.append("Image5=").append(getImage5()).append(" ");
			sb.append("]");
			return sb.toString();
		}
	}
	
}
